package com.yanqu.road.server.cmd.unioncampwar;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.unionCampWar.UnionCampWar;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.server.manager.unioncampwar.CrossUnionCampWarMgr;
import com.yanqu.road.server.protocol.ClientProtocol;
import com.yanqu.road.server.protocol.CrossProtocol;
import com.yanqu.road.utils.YanQuMessageUtils;

@Cmd(code = CrossProtocol.C3_UNION_CAMP_WAR_MAIN_SCENCE_INFO, desc = "商帮主界面数据")
public class CrossUnionCampWarMainScenceCmd extends CrossCommand {
    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {
        UnionCampWar.CrossUnionCampWarGetMainScenceReqMsg reqMsg = UnionCampWar.CrossUnionCampWarGetMainScenceReqMsg.parseFrom(packet.getBytes());
        MessageHelper.sendPacket(serverId, packet.getPlayerId(),
                YanQuMessageUtils.buildMessage(ClientProtocol.U_UNION_CAMP_WAR_MAIN_SCENCE_INFO, CrossUnionCampWarMgr.getMainScenceMsg(packet.getPlayerId(), reqMsg.getLastEnterTime())));
    }

    @Override
    public void sendData() {

    }
}
